def mapGroup(grp1, grp2, ordered = 1):
	print 'group1 %s' % grp1 + '\ngroup2 %s' % grp2
	maplist = []
	
	idx_1 = 0
	idx_2 = 0
	
	len1 = len(grp1)
	len2 = len(grp2)
	
	safety = 0
	while True:
		if idx_1 == len1:
			break
	
		if grp1[idx_1] == grp2[idx_2]:
			maplist.append([idx_1,idx_2])
			idx_1 += 1
			idx_2 += 1
		else:
			idx_2 += 1
	
		safety += 1
		if safety > len(grp1) ** 2:
			break
	return maplist
		

